import request from '@/http/index.js'
//验证码登录
export function mobilelogin(data) {
  return request({
    url: '/user/mobilelogin',
    method: 'POST',
    data,
    needLoading: true
  })
}
//发送验证码
export function send(data) {
  return request({
    url: '/sms/send',
    method: 'POST',
    data,
    needLoading: true
  })
}
//修改信息
export function profile(data) {
  return request({
    url: '/user/profile',
    method: 'POST',
    data
  })
}
//账号注销
export function writeOff(data) {
  return request({
    url: '/user/writeOff',
    method: 'POST',
    data,
    needLoading: true
  })
}
//获取用户个人中心信息
export function info(data) {
  return request({
    url: '/user/info',
    method: 'GET',
    data
  })
}
//获取鉴定藏品价格列表
export function priceList(data) {
  return request({
    url: '/expert/priceList',
    method: 'GET',
    data,
    needLoading: true
  })
}
//保存藏品价格
export function modifyPrice(data) {
  return request({
    url: '/expert/modifyPrice',
    method: 'POST',
    data,
    needLoading: true
  })
}
//鉴定任务列表分类
export function categoryList(data) {
	return request({
		url: '/expert/categoryList',
		method: 'GET',
		data
	})
}
//鉴定任务列表
export function taskList(data) {
	return request({
		url: '/task/list',
		method: 'GET',
		data
	})
}
//订单详情
export function orderInfo(data) {
	return request({
		url: '/task/orderInfo',
		method: 'GET',
		data,
    needLoading: true
	})
}
//取消订单
export function taskCancel(data) {
	return request({
		url: '/task/cancel',
		method: 'POST',
		data,
    needLoading: true
	})
}
//删除订单
export function taskDelete(data) {
	return request({
		url: '/task/delete',
		method: 'POST',
		data,
    needLoading: true
	})
}
//获取分享二维码，启动页图片，banner图
export function images(data) {
	return request({
		url: `/expert/images`,
		method: 'GET',
    data
	});
}	

//苹果支付生成订单号
export function applePay(data) {
  return request({
    url: '/order/applePay',
    method: 'POST',
    data,
    needLoading: false
  })
}
//iOS支付成功验证
export function applepay(data) {
  return request({
    url: '/pay/applepay',
    method: 'POST',
    data,
    needLoading: false
  })
}
//实名认证
export function bindRealName(data) {
  return request({
    url: '/user/bindRealName',
    method: 'POST',
    data
  })
}
//绑定支付宝账号
export function bindAlipay(data) {
  return request({
    url: '/user/bindAlipay',
    method: 'POST',
    data
  })
}
//提现
export function withdraw(data) {
  return request({
    url: '/user/withdraw',
    method: 'POST',
    data,
    needLoading: false
  })
}
//消费记录
export function coinsLog(data) {
  return request({
    url: '/user/coinsLog',
    method: 'GET',
    data,
    needLoading: false
  })
}